package com.heyqing.dynamic.NumberTower;

import java.util.Scanner;

/**
 * ClassName:NumberTower
 * Package:com.heyqing.dynamic.NumberTower
 * Description:
 *
 * @Date:2024/6/3
 * @Author:Heyqing
 */
public class NumberTower {
    //数塔
    private int[][] numberTower;
    private int numberTowerFloor;

    //初始化
    public NumberTower() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入数塔层数：");
        this.numberTowerFloor = sc.nextInt();
        this.numberTower = new int[numberTowerFloor][numberTowerFloor];
        for (int i = 0; i < numberTowerFloor; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print("第"+(i+1)+"层，第" + (j+1) + "个数：");
                numberTower[i][j] = sc.nextInt();
            }
        }
        sc.close();
    }
    public int[][] getNumberTower() {
        return numberTower;
    }

    public int getNumberTowerFloor() {
        return numberTowerFloor;
    }
}
